<div class="tiaozhuan">
  <div>
          {if $msg_type==0}
          <img src="{$imgDomain}images/information.gif"  border="0" alt="information" align="absmiddle" />
          {elseif $msg_type eq 1}
          <img src="{$imgDomain}images/warning.gif"  border="0" alt="warning" align="absmiddle" />
          {else} 
          <img src="{$imgDomain}images/confirm.gif"  border="0" alt="confirm" align="absmiddle" />
          {/if}
        
           <strong>{$msg_detail}</strong>
  
           <p>{if $auto_redirect}如果您不做出选择，将在<span id="spanSeconds">3</span> 秒后跳转到第一个链接地址。 {/if}<br />
 
          
           {foreach from=$links item=link}
           <a href="{$link.href}" {if $link.target}target="{$link.target}"{/if}>{$link.text}</a>
           {/foreach}
       	   </p>

  </div>
</div>
{if $auto_redirect}
<script language="JavaScript">

var seconds = 3;
var defaultUrl = "{$default_url}";
var setIntervalId=0;

{literal}
onload = function()
{
  if (defaultUrl == 'javascript:history.go(-1)' && window.history.length == 0)
  {
    document.getElementById('redirectionMsg').innerHTML = '';
    return;
  }

  setIntervalId=window.setInterval(redirection, 1000);
}
function redirection()
{
  if (seconds <= 0)
  {
    window.clearInterval(setIntervalId);
    return;
  }

  seconds --;
  document.getElementById('spanSeconds').innerHTML = seconds;

  if (seconds == 0)
  {
    window.clearInterval(setIntervalId);
    location.href = defaultUrl;
  }
}

</script>
{/literal}
{/if}
